package main.java.game.event;

import main.java.game.Game;

public class WindFall extends Event {
	Integer monstersDead;
	public WindFall(String name, Boolean subscribed){
		super(name,subscribed);
		
	}
	public void takeEffect(Game game){
		super.takeEffect(game);
		monstersDead =game.getPlayer().getDeadMonsters().size();
	}
	public void update(Game game, Integer round) {
		if(monstersDead.equals(game.getPlayer().getDeadMonsters().size())){
			game.getPlayer().setGold(game.getPlayer().getGold()+200);
			System.out.println("You win 200 gold coins!\n");
		}
		game.deleteObserver(this);
			
		
	}

}
